<? foreach($tasks as $task): ?>
<div <?if($task->task_type):?>style="background: #bae1ff"<?else:?>style="background: #ffdeba"<?endif;?>>
<p><?=$task->user_name;?></p>
<p><a href="#"><?=$task->task_short_desc;?></a> (<?=$task->task_cost;?> руб.)</p>
</div>
<? endforeach; ?>